package com.project.shinP3;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.beans.factory.annotation.Autowired;

public class UserController{
	
	@Autowired
    private SqlSession sqlSession;
	public void addUser(UserDTO userDTO) {
		String id = userDTO.getId();
		System.out.print("id=========="+id);
		SqlSessionFactoryBuilder sqlSession = new SqlSessionFactoryBuilder();
	}
	public void login(UserDTO userDTO) {
		String id = userDTO.getId();
		System.out.print("id=========="+id);
	}
	
	public UserDTO searchUser(UserDTO userDTO) {
		HashMap<String, String> input = new HashMap<String, String>();
	    input.put("name", "shin");
	    List<HashMap<String, String>> outputs = sqlSession.selectList("userControlMapper.selectSample", input); 
	    System.out.print(outputs.toString());
		return userDTO;
	}

}
